﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Configuration;

namespace Wicresoft.EKA.NRemedy.Test
{
    [TestClass]
    public class UnitTest3
    {
        [TestMethod]
        public void TestMethod1()
        {
            string ARServer = ConfigurationManager.AppSettings["ARServer"];
            string ARUid = ConfigurationManager.AppSettings["ARUid"];
            string ARPwd = ConfigurationManager.AppSettings["ARPwd"];

            ARLoginContext loginContext = new ARLoginContext(ARServer, ARUid, ARPwd);

            ARProxy<UserModel> user = new ARProxy<UserModel>(loginContext);

            loginContext.BeginBulkEntryTransaction();

            for (int i = 0; i < 100; i++)
            {
                user.CreateEntry(
                    new UserModel()
                    {
                        LoginName = "b" + i,
                        Password = "123",
                        LicenseType = UserModel.LicenseType_Enum.Floating,
                        FullName = "b" + i,
                        Creator="Demo"
                    }
                    );
            }

            loginContext.SendBulkEntryTransaction();

        }
    }
}
